import { Define, EntityObjectFactory } from 'tiny-entity2';
const EntityObjectType = EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');
@Define.Table({ TableName: "role" })
export class Role extends EntityObjectType<Role>{
    @Define.PrimaryKey()
    id: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    name: string;
    
    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    description: string;

    @Define.Column({
        DataType: Define.DataType.BOOL
    })
    isGlobal: boolean;

    @Define.Column({
        DataType: Define.DataType.BIGINT,
        NotAllowNULL: true
    })
    createTime: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        NotAllowNULL: true,
    })
    organizationId: string;

    @Define.Column({
        DataType: Define.DataType.BOOL
    })
    isDelete: boolean;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    status: string;

    organizationName: string;
}